import axios from '@/libs/request/axios'
// 查询合同取消面详细数据 /contractManage/contractCancel/findByIdDetails?id=12
export const findByIdDetails = (caseNo) => {
    return axios.request({
        url: `/contractManage/contractCancel/findByIdDetails`,
        method: 'POST',
        params: {
            caseNo
        },
    })
};

// 查询合同取消列表数据 /contractManage/contractCancel/findContractCancelList
export const findContractCancelList = (params) => {
    return axios.request({
        url: `/contractManage/contractCancel/findContractCancelList`,
        method: 'POST',
        data: params
    })
};

// 查询合同取消列表数据
// http://10.50.133.70:9999/contractManage/contractCancel/findContractCancelLists
export const findContractCancelLists = (params) => {
    return axios.request({
        url: `/contractManage/contractCancel/findContractCancelLists`,
        method: 'POST',
        data: params
    })
};

// 保存合同取消信息 http://10.50.133.70:9999/contractManage/contractCancel/submit
export const submit = (params) => {
    return axios.request({
        url: `/contractManage/contractCancel/submit`,
        method: 'POST',
        data: params
    })
};

// 多条件查询已激活案件列表/contractList/findActivatedContractList
export const getBasicCancelList = (params) => {
    return axios.request({
        url: `/contractBasic/basicCanaelInfo/getBasicCancelList`,
        method: 'POST',
        data: params
    })
};

// 多条件查询已激活已放款案件列表/contractList/findActivatedContractList
export const getBasicCancelLoanList = (params) => {
    return axios.request({
        url: `/contractBasic/basicCanaelInfo/getBasicCancelLoanList`,
        method: 'POST',
        data: params
    })
};
// 提交合同取消信息
export const submitCancelRecord = (params) => {
    return axios.request({
        url: '/contractManage/contractCancel/submitCancelRecord',
        data: params,
        method: 'post'
    })
};
// 保存合同取消审批信息
export const saveProposalApplicationInfo = (params) => {
    return axios.request({
        url: '/contractManage/contractCancel/saveProposalApplicationInfo',
        data: params,
        method: 'post'
    })
};
// 删除案件
export const delById = (id, params) => {
    return axios.request({
        url: `/contractManage/contractCancel/delById/${id}`,
        params: params,
        method: 'delete'
    })
};

// 查询到账记录列表数据
export const getArrivalList = (params) => {
    return axios.request({
        url: `/contractManage/contractCancel/getArrivalList`,
        method: 'POST',
        data: params
    })
};
// 查询已勾稽到账记录列表数据
export const getArrival = (contractNo) => {
    return axios.request({
        url: `/contractManage/contractCancel/getArrival`,
        method: 'POST',
        params: {
            contractNo
        },
    })
};
// 根据合同号更新合同主表的的合同状态
export const updateMainInfo = (params) => {
    return axios.request({
        url: `/contractBasic/contractInfo/updateContractStatus`,
        method: 'POST',
        data: params
    })
};
// 根据合同号更新付款池表的的放款状态
export const updatePaymentStatus = (params) => {
    return axios.request({
        url: `/contractBasic/basicPaymentPool/updateStatus`,
        method: 'POST',
        data: params
    })
};
